<?php
// insert_user.php
try {
    $db = new PDO('sqlite:./SQL/userlite.db');
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    $username = "administrator";
    $password = password_hash("qwer1234", PASSWORD_BCRYPT);

    $query = "INSERT INTO users (username, password) VALUES (:username, :password)";
    $stmt = $db->prepare($query);
    $stmt->bindParam(':username', $username);
    $stmt->bindParam(':password', $password);

    $stmt->execute();
    echo "User inserted successfully!";
} catch (PDOException $e) {
    echo "An error occurred: " . $e->getMessage();
    echo "Database and table insert failed";
    echo "ERROR CODE: C0002";
}
